Method and apparatus for encoding images and method and apparatus for decoding images

ABSTRACT

An apparatus for decoding an image includes an encoding information extractor which extracts split information indicating whether to split a coding unit of an upper depth into coding units of deeper depths and skip information indicating whether a prediction mode of a current coding unit is a skip mode, from image data and a decoding unit which determines a split structure of a maximum coding unit, according to the split information so that the maximum coding unit is hierarchically split as a depth increases and determines whether the prediction mode of the current coding unit is the skip mode according to the skip information.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation application of U.S. patent application Ser. No.14/500,045, which is a continuation application of U.S. patentapplication Ser. No. 14/283,752, which is a continuation application ofU.S. patent application Ser. No. 13/386,803, filed on Feb. 13, 2012, inthe U.S. Patent and Trademark Office, which is a National Stage ofInternational Application No. PCT/KR2010/004868, filed Jul. 23, 2010,which claims priority from Korean Patent Application No.10-2009-0067827, filed on Jul. 24, 2009, in the Korean IntellectualProperty Office, the disclosures of which are incorporated herein byreference in their entireties.

TECHNICAL FIELD

The inventive concept relates to encoding and decoding an image.

RELATED ART

Examples of an image prediction encoding method include an intraprediction method and an inter prediction method. The intra predictionmethod is a prediction method based on a correlation of adjacent pixelsin a single frame. The inter prediction method is a method of predictinga region similar to data encoded from an adjacent frame via motionprediction and compensation.

Generally, a motion vector of a block has a close correlation with amotion vector of an adjacent block. Thus, a bit amount generated duringencoding may be reduced by predicting a motion vector of a current blockfrom an adjacent block, and encoding only a differential motion vectorbetween the motion vector of the current block and a prediction motionvector.

A skip mode is a mode selected when a motion vector of a macroblock isidentical to a prediction motion vector predicted by using a motionvector of an adjacent block and when a prediction error is sufficientlysmall. When the skip mode is selected as a prediction mode of amacroblock, an encoder only transmits information about the skip mode ofthe macroblock and does not transmit residual data. A decoder mayrestore the macroblock by performing motion compensation on themacroblock encoded in the skip mode by using a prediction motion vectorpredicted from a block adjacent to the macroblock.

TECHNICAL SOLUTION

Exemplary embodiments provide methods and apparatuses for encoding anddecoding an image, which efficiently transmit information about splitstructures of an image encoded based on a hierarchical coding unit invarious sizes, and information about a skip mode of each coding unit.

Advantageous Effects

Exemplary embodiments may provide methods and apparatuses for encodingand decoding an image, which efficiently transmit information aboutsplit structures of an image encoded based on a hierarchical coding unitin various sizes, and information about a skip mode of each coding unit

DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an apparatus for encoding an image,according to an exemplary embodiment;

FIG. 2 is a block diagram of an apparatus for decoding an image,according to an exemplary embodiment;

FIG. 3 is a diagram for describing a concept of hierarchical codingunits according to an exemplary embodiment;

FIG. 4 is a block diagram of an image encoder based on coding unitsaccording to an exemplary embodiment;

FIG. 5 is a block diagram of an image decoder based on coding unitsaccording to an exemplary embodiment;

FIG. 6 is a diagram illustrating deeper coding units according todepths, and prediction units according to an exemplary embodiment;

FIG. 7 is a diagram for describing a relationship between a coding unitand transformation units, according to an exemplary embodiment;

FIG. 8 is a diagram for describing encoding information of coding unitscorresponding to a coded depth, according to an exemplary embodiment;

FIG. 9 is a diagram of deeper coding units according to depths,according to an exemplary embodiment;

FIGS. 10 through 12 are diagrams for describing a relationship betweencoding units, prediction units, and transformation units, according toan exemplary embodiment;

FIG. 13 is a diagram for describing a relationship between a codingunit, a prediction unit or a partition, and a transformation unit,according to encoding mode information of Table 1;

FIG. 14 is a diagram of split structures of a maximum coding unitdetermined based on deeper coding units, according to an exemplaryembodiment;

FIG. 15 is a diagram for describing split information of a coding unitof FIG. 14 having a depth of 2;

FIG. 16 is a diagram for describing split information of a coding unitof FIG. 14 having a depth of 3;

FIG. 17 is a diagram for describing a processing order of coding units,according to an exemplary embodiment;

FIG. 18 is a flowchart illustrating a method of encoding an image,according to an exemplary embodiment;

FIG. 19 is a flowchart illustrating a method of encoding an image,according to another exemplary embodiment;

FIG. 20 is a flowchart illustrating a method of decoding an image,according to an exemplary embodiment;

FIG. 21 is a flowchart illustrating a process of splitting a maximumdecoding unit and a process of decoding skip information, according to amethod of decoding an image, according to an exemplary embodiment;

FIG. 22 is a flowchart illustrating a method of decoding an image,according to another exemplary embodiment; and

FIG. 23 is a flowchart illustrating a process of splitting a maximumdecoding unit and a process of decoding skip information, according to amethod of decoding an image, according to another exemplary embodiment.

SUMMARY

According to an aspect of an exemplary embodiment, there is provided amethod of encoding an image, the method comprising: splitting a currentpicture into at least one maximum coding unit; determining a splitstructure of the at least one maximum coding unit and a prediction modeof each coding unit by encoding image data of the at least one maximumcoding unit based on deeper coding units according to depths, which arehierarchically split as a depth deepens; setting split information abouta split of a coding unit of an upper depth including each coding unit,according to each coding unit; setting skip information indicatingwhether the determined prediction mode is a skip mode, according to eachcoding unit; and encoding the split information and skip information,which are set according to each coding unit.

According to another aspect of an exemplary embodiment, there isprovided a method of encoding an image, the method comprising: splittinga current picture into at least one maximum coding unit; determining asplit structure of the at least one maximum coding unit and a predictionmode of each coding unit by encoding image data of the at least onemaximum coding unit based on deeper coding units according to depths,which are hierarchically split as a depth deepens; setting skipinformation indicating whether the prediction mode of each coding unitand a prediction mode of an upper depth including each coding unit areeach a skip mode, according to each coding unit; setting splitinformation about a split of a coding unit of an upper depth includingeach coding unit, according to each coding unit; and encoding the splitinformation and skip information, which are set according to each codingunit.

According to another aspect of an exemplary embodiment, there isprovided A method of decoding an image, the method comprising:extracting split information about a split of decoding units of upperdepths including a current decoding unit to be decoded, from image dataencoded according to maximum coding units based on deeper coding unitsaccording to depths, which are hierarchically split as a depth deepens;extracting skip information indicating whether a prediction mode of thecurrent decoding unit is a skip mode, from the image data; determiningsplit structures of a maximum decoding unit including the currentdecoding unit, according to the split information; determining whetherthe prediction mode of the current decoding unit is a skip modeaccording to the skip information.

According to another aspect of an exemplary embodiment, there isprovided a method of decoding an image, the method comprising:extracting skip information indicating whether prediction modes of acurrent decoding unit to be decoded and decoding units of upper depthsincluding the current decoding unit are each a skip mode, from imagedata encoded according to maximum coding units based on deeper codingunits according to depths, which are hierarchically split as a depthdeepens; extracting split information about a split of the decodingunits of upper depths including the current decoding unit; determiningwhether the prediction modes of the current decoding unit and thedecoding units of upper depths are each a skip mode according to theextracted skip information; and determining split structures of amaximum decoding unit including the current decoding unit, according tothe split information.

According to another aspect of an exemplary embodiment, there isprovided an apparatus for encoding an image, the apparatus comprising: amaximum coding unit splitter for splitting a current picture into atleast one maximum coding unit; a coded depth determiner for determininga split structure of the at least one maximum coding unit and aprediction mode of each coding unit by encoding image data of the atleast one maximum coding unit based on deeper coding units according todepths, which are hierarchically split as a depth deepens; and anencoding information coding unit for setting split information about asplit of a coding unit of an upper depth including each coding unit,according to each coding unit and skip information indicating whetherthe determined prediction mode is a skip mode, according to each codingunit, and encoding the set split information and skip information.

According to another aspect of an exemplary embodiment, there isprovided An apparatus for encoding an image, the apparatus comprising: amaximum coding unit splitter for splitting a current picture into atleast one maximum coding unit; a coded depth determiner for determininga split structure of the at least one maximum coding unit and aprediction mode of each coding unit by encoding image data of the atleast one maximum coding unit based on deeper coding units according todepths, which are hierarchically split as a depth deepens; and anencoding information coding unit for setting skip information indicatingwhether the prediction mode of each coding unit and a prediction mode ofan upper depth including each coding unit are each a skip mode and splitinformation about a split of a coding unit of an upper depth includingeach coding unit, according to each coding unit, and encoding the setsplit information and skip information.

According to another aspect of an exemplary embodiment, there isprovided An apparatus for decoding an image, the apparatus comprising:an encoding information extractor for extracting split information abouta split of decoding units of upper depths including a current decodingunit to be decoded and skip information indicating whether a predictionmode of the current decoding unit is a skip mode, from image dataencoded according to maximum coding units based on deeper coding unitsaccording to depths, which are hierarchically split as a depth deepens;and a decoding unit for determining split structures of a maximumdecoding unit including the current decoding unit, according to thesplit information, and determining whether the prediction mode of thecurrent decoding unit is a skip mode according to the skip information.

According to another aspect of an exemplary embodiment, there isprovided an apparatus for decoding an image, the apparatus comprising:an encoding information extractor for extracting skip informationindicating whether prediction modes of a current decoding unit to bedecoded and decoding units of upper depths including the currentdecoding unit are each a skip mode and split information about a splitof the decoding units of upper depths including the current decodingunit from image data encoded according to maximum coding units based ondeeper coding units according to depths, which are hierarchically splitas a depth deepens; and a decoding unit for determining whether theprediction modes of the current decoding unit and the decoding units ofupper depths are each a skip mode according to the extracted skipinformation, and determining split structures of a maximum decoding unitincluding the current decoding unit, according to the split information.

DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS

Hereinafter, the exemplary embodiments will be described more fully withreference to the accompanying drawings, in which exemplary embodimentsof the inventive concept are shown.

FIG. 1 is a block diagram of an image encoding apparatus 100, accordingto an exemplary embodiment.

Referring to FIG. 1, the image encoding apparatus 100 according to thecurrent embodiment includes a maximum coding unit splitter 110, a codeddepth determiner 120, an image data coding unit 130, and encodinginformation coding unit 140.

The maximum coding unit splitter 110 may split a current picture orcurrent slice based on a maximum coding unit. The current picture orcurrent slice is split into at least one maximum coding unit. Themaximum coding unit according to an exemplary embodiment may be a dataunit having a size of 32×32, 64×64, 128×128, 256×256, etc., wherein astructure of the data unit is a square having a width and length insquares of 2, the width and length being larger than 8. The image datamay be output to the coded depth determiner 120 according to the atleast one maximum coding unit.

A coding unit according to an exemplary embodiment may be expressed by amaximum coding unit and a depth. The maximum coding unit denotes acoding unit having the largest size from among coding units of a currentpicture, and the depth denotes a number of times the coding unit isspatially split from the maximum coding unit. As the depth deepens,deeper coding units according to depths may be split from the maximumcoding unit to a minimum coding unit. A depth of the maximum coding unitis an uppermost depth and a depth of the minimum coding unit is alowermost depth. Since a size of a coding unit corresponding to eachdepth decreases as the depth of the maximum coding unit deepens, acoding unit corresponding to an upper depth may include a plurality ofcoding units corresponding to lower depths.

As described above, the image data of the current picture is split intothe maximum coding units according to a maximum size of the coding unit,and each of the maximum coding units may include deeper coding unitsthat are split according to depths. Since the maximum coding unitaccording to an exemplary embodiment is split according to depths, theimage data of a spatial domain included in the maximum coding unit maybe hierarchically classified according to depths.

A maximum depth and a maximum size of a coding unit, which limit thetotal number of times a height and a width of the maximum coding unitare hierarchically split, may be predetermined. Such a maximum codingunit and maximum depth may be set in a picture or slice unit. In otherwords, different maximum coding units and different maximum depths maybe set for each picture or slice, and a size of a minimum coding unitincluded in the maximum coding unit may be variously set according tothe maximum depth. As such, by variously setting the maximum coding unitand the maximum depth according to pictures or slices, encodingefficiency may be improved by encoding an image of a flat region byusing the maximum coding unit, and compression efficiency of an imagemay be improved by encoding an image having high complexity by using acoding unit having a smaller size than the maximum coding unit.

The coding unit determiner 120 determines depths according to maximumcoding units. The depth may be determined based on a rate-distortion(R-D) cost calculation. In detail, the coded depth determiner 120encodes at least one split region obtained by splitting a region of themaximum coding unit according to depths, and determines a depth tooutput a finally encoded image data according to the at least one splitregion. In other words, the coded depth determiner 120 determines acoded depth by encoding the image data in the deeper coding unitsaccording to depths, according to the maximum coding unit of the currentpicture, and selecting a depth having the least encoding error. Thedetermined maximum depth is output to the encoding information codingunit 140, and the image data according to maximum coding units is outputto the image data coding unit 130.

The image data in the maximum coding unit is encoded based on the deepercoding units corresponding to at least one depth equal to or below themaximum depth, and results of encoding the image data are compared basedon each of the deeper coding units. A depth having the least encodingerror may be selected after comparing encoding errors of the deepercoding units. At least one coded depth may be selected for each maximumcoding unit.

The size of the maximum coding unit is split as a coding unit ishierarchically split according to depths, and as the number of codingunits increases. Also, coding units corresponding to a same depth in onemaximum coding unit may be split to the coding units of a lower depth bymeasuring an encoding error of the image data, separately. Accordingly,even when image data is included in one maximum coding unit, theencoding errors may differ according to regions in the one maximumcoding unit, and thus the coded depths may differ according to regionsin the image data. In other words, the maximum coding unit may be splitinto coding units having different sizes according to different depths.Thus, one or more coded depths may be determined in one maximum codingunit, and the image data of the maximum coding unit may be splitaccording to coding units of at least one coded depth.

Accordingly, the coding unit determiner 120 according to an exemplaryembodiment may determine coding units having a tree structure includedin the maximum coding unit. The ‘coding units having a tree structure’according to an exemplary embodiment include coding units correspondingto a depth determined to be the coded depth, from among all deepercoding units included in the maximum coding unit. A coding unit of acoded depth may be hierarchically determined according to depths in thesame region of the maximum coding unit, and may be independentlydetermined in different regions. Similarly, a coded depth in a currentregion may be independently determined from a coded depth in anotherregion.

A maximum depth according to an exemplary embodiment is an index relatedto the number of splits from a maximum coding unit to a minimum codingunit. A first maximum depth according to an exemplary embodiment maydenote the total number of splits from the maximum coding unit to theminimum coding unit. A second maximum depth according to an exemplaryembodiment may denote the total number of depth levels from the maximumcoding unit to the minimum coding unit. For example, when a depth of themaximum coding unit is 0, a depth of a coding unit, in which the maximumcoding unit is split once, may be set to 1, and a depth of a codingunit, in which the maximum coding unit is split twice, may be set to 2.Here, if the minimum coding unit is a coding unit in which the maximumcoding unit is split four times, 5 depth levels of depths 0, 1, 2, 3 and4 exist, and thus the first maximum depth may be set to 4, and thesecond maximum depth may be set to 5.

Prediction encoding and transformation of the maximum coding unit arealso performed based on the deeper coding units according to a depthequal to or depths less than the maximum depth, according to the maximumcoding unit. In other words, the image encoding apparatus 100 mayvariously select a size or structure of a data unit for encoding theimage data. In order to encode the image data, operations, such asprediction, transformation, and entropy encoding, are performed, and atthis time, the same data unit may be used for all operations ordifferent data units may be used for each operation.

For example, the image encoding apparatus 100 may select a data unitthat is different from the coding unit, so as to predict the codingunit. In order to perform prediction encoding in the maximum codingunit, the prediction encoding may be performed based on a coding unitcorresponding to a coded depth, i.e., based on a coding unit that is nolonger split to coding units corresponding to a lower depth.Hereinafter, the coding unit that becomes a basis unit for predictionwill now be referred to as a ‘prediction unit’. A partition obtained bysplitting the prediction unit may include a prediction unit or a dataunit obtained by splitting at least one of a height and a width of theprediction unit.

For example, when a coding unit of 2N×2N (where N is a positive integer)is no longer split and becomes a prediction unit of 2N×2N, and a size ofa partition may be 2N×2N, 2N×N, N×2N, or N×N. Examples of a partitiontype include symmetrical partitions that are obtained by symmetricallysplitting a height or width of the prediction unit, partitions obtainedby asymmetrically splitting the height or width of the prediction unit,such as 1:n or n:1, partitions that are obtained by geometricallysplitting the prediction unit, and partitions having arbitrarystructures.

A prediction mode of the prediction unit may be at least one of an intramode, a inter mode, and a skip mode. For example, the intra mode or theinter mode may be performed on the partition of 2N×2N, 2N×N, N×2N, orN×N. Also, the skip mode may be performed only on the partition of2N×2N. If the coding unit includes a plurality of prediction units, theencoding is independently performed on each prediction unit in thecoding unit, thereby selecting a prediction mode having a least encodingerror.

Alternatively, the image encoding apparatus 100 may transform the imagedata based on a data unit having a different size from the coding unit.In order to transform the coding unit, transformation may be performedbased on a data unit having a size smaller than or equal to the codingunit. Hereinafter, a data unit used as a base of the transformation willnow be referred to as a “transformation unit”. Similarly to the codingunit, the transformation unit in the coding unit may be recursivelysplit into smaller sized transformation units, and thus, residual datain the coding unit may be divided according to the transformation havingthe tree structure according to transformation depths.

A transformation depth according to an exemplary embodiment indicatingthe number of splits to reach the transformation unit by splitting theheight and width of the coding unit may also be set in thetransformation unit. For example, in a current coding unit of 2N×2N, atransformation depth may be 0 when the size of a transformation unit isalso 2N×2N, may be 1 when the size of the transformation unit is N×N,and may be 2 when the size of the transformation unit is N/2×N/2. Inother words, the transformation unit having a tree structure accordingto transformation depths may be set. Encoding information according tocoded depths requires not only information about the coded depth, butalso about information related to prediction encoding andtransformation. Accordingly, the coded depth determiner 120 not onlydetermines a coded depth having a least encoding error, but alsodetermines a partition type to split the prediction unit to partitions,a prediction mode according to prediction units, and a size of atransformation unit for transformation.

The coded depth determiner 120 may measure an encoding error of deepercoding units according to depths by using Rate-Distortion Optimizationbased on Lagrangian multipliers, so as to determine a spilt structure ofthe maximum coding unit having an optimum encoding error. In otherwords, the coded depth determiner 120 may determine structures of thecoding units to be split from the maximum coding unit, wherein the sizesof the coding units are different according to depths.

The image data coding unit 130 outputs the image data of the maximumcoding unit, which is encoded based on the at least one coded depthdetermined by the coded depth determiner 120, in bitstreams. Since theencoding is already performed by the coded depth determiner 120 tomeasure the minimum encoding error, an encoded data stream may be outputby using the minimum encoding error.

The encoding information coding unit 140 outputs information about theencoding mode according to coded depth, which is encoded based on the atleast one coded depth determined by the coded depth determiner 120, inbitstreams. The information about the encoding mode according to codeddepth may include information about the coded depth, about partitiontype to split the prediction unit to partitions, the prediction modeaccording to prediction units, and the size of the transformation unit.

The information about the coded depth may be defined by using splitinformation according to depths, which indicates whether encoding isperformed on coding units of a lower depth instead of a current depth.If the current depth of the current coding unit is the coded depth,image data in the current coding unit is encoded and output, and thusthe split information may be defined not to split the current codingunit to a lower depth. Alternatively, if the current depth of thecurrent coding unit is not the coded depth, the encoding is performed onthe coding unit of the lower depth, and thus the split information maybe defined to split the current coding unit to obtain the coding unitsof the lower depth.

If the current depth is not the coded depth, encoding is performed onthe coding unit that is split into the coding unit of the lower depth.Since at least one coding unit of the lower depth exists in one codingunit of the current depth, the encoding is repeatedly performed on eachcoding unit of the lower depth, and thus the encoding may be recursivelyperformed for the coding units having the same depth.

Since the coding units having a tree structure are determined for onemaximum coding unit, and information about at least one encoding mode isdetermined for a coding unit of a coded depth, information about atleast one encoding mode may be determined for one maximum coding unit.Also, a coded depth of the image data of the maximum coding unit may bedifferent according to locations since the image data is hierarchicallysplit according to depths, and thus information about the coded depthand the encoding mode may be set for the image data.

Accordingly, the encoding information coding unit 140 according to anexemplary embodiment may assign encoding information about acorresponding coded depth and an encoding mode to at least one of thecoding unit, the prediction unit, and a minimum unit included in themaximum coding unit.

The minimum unit according to an exemplary embodiment is a rectangulardata Unit obtained by splitting the minimum coding unit constituting thelowermost depth by 4. Alternatively, the minimum unit may be a maximumrectangular data unit that may be included in all of the coding units,prediction units, partition units, and transformation units included inthe maximum coding unit. For example, the encoding information outputthrough the encoding information coding unit 140 may be classified intoencoding information according to coding units, and encoding informationaccording to prediction units. The encoding information according to thecoding units may include the information about the prediction mode andabout the size of the partitions. The encoding information according tothe prediction units may include information about an estimateddirection of an inter mode, about a reference image index of the intermode, about a motion vector, about a chroma component of an intra mode,and about an interpolation method of the intra mode. Also, informationabout a maximum size of the coding unit defined according to pictures,slices, or GOPs, and information about a maximum depth may be insertedinto SPS (Sequence Parameter Set) or a header of a bitstream.

In the image encoding apparatus 100, the deeper coding unit may be acoding unit obtained by dividing a height or width of a coding unit ofan upper depth, which is one layer above, by two. In other words, whenthe size of the coding unit of the current depth k is 2N×2N, the size ofthe coding unit of the lower depth k+1 is N×N. Thus, the coding unit ofthe current depth having the size of 2N×2N may include maximum 4 of thecoding unit of the lower depth of N×N.

Accordingly, the image encoding apparatus 100 according to an exemplaryembodiment may form the coding units having the tree structure bydetermining coding units having an optimum structure and an optimum sizefor each maximum coding unit, based on the size of the maximum codingunit and the maximum depth determined considering characteristics of thecurrent picture. Also, since encoding may be performed on each maximumcoding unit by using any one of various prediction modes andtransformations, an optimum encoding mode may be determined consideringcharacteristics of the coding unit of various image sizes.

If an image having high resolution or large data amount is encoded in aconventional macroblock having a size of 16×16, a number of macroblocksper picture excessively increases. Accordingly, a number of pieces ofcompressed information generated for each macroblock increases, and thusit is difficult to transmit the compressed information and datacompression efficiency decreases. However, by using the image encodingapparatus 100, image compression efficiency may be increased since acoding unit is adjusted while considering characteristics of an imagewhile increasing a maximum size of a coding unit while considering asize of the image.

FIG. 2 is a block diagram of an image decoding apparatus 200, accordingto an exemplary embodiment.

Referring to FIG. 2, the image decoding apparatus 200 includes an imagedata obtainer 210, an encoding information extractor 220, and an imagedata decoding unit 230. Definitions of various terms, such as a codingunit, a depth, a prediction unit, a transformation unit, and informationabout various encoding modes, for various operations of the imagedecoding apparatus 200 are identical to those described with referenceto FIG. 1 and the image encoding apparatus 100. The image data obtainer210 receives and parses a bitstream received by the image decodingapparatus 200 to obtain image data according to maximum coding units,and outputs the image data to the image data decoding unit 230. Theimage data obtainer 210 may extract information about the maximum codingunit of a current picture or slice from a header about the currentpicture or slice. The image decoding apparatus 200 according to anexemplary embodiment decodes the image data according to maximum codingunits.

Also, the encoding information extractor 220 extracts information abouta coded depth and an encoding mode for the coding units having a treestructure according to each maximum coding unit, by parsing thebitstream received by the image decoding apparatus 200. The extractedinformation about the coded depth and the encoding mode is output to theimage data decoding unit 230.

The information about the coded depth and the encoding mode according tothe maximum coding unit may be set for information about at least onecoding unit corresponding to the coded depth, and information about anencoding mode may include information about a partition type of acorresponding coding unit corresponding to the coded depth, about aprediction mode, and a size of a transformation unit. Also, splittinginformation according to depths may be extracted as the informationabout the coded depth.

The information about the coded depth and the encoding mode according toeach maximum coding unit extracted by the encoding information extractor220 is information about a coded depth and an encoding mode determinedto generate a minimum encoding error when an encoder, such as the imageencoding apparatus 100, repeatedly performs encoding for each deepercoding unit according to depths according to each maximum coding unit.Accordingly, the image decoding apparatus 200 may restore an image bydecoding the image data according to an encoding mode that generates theminimum encoding error.

Since encoding information about the coded depth and the encoding modemay be assigned to a predetermined data unit from among a correspondingcoding unit, a prediction unit, and a minimum unit, the encodinginformation extractor 220 may extract the information about the codeddepth and the encoding mode according to the predetermined data units.If the information about the coded depth and the encoding mode of thecorresponding maximum coding unit is recorded according to thepredetermined data units, the predetermined data units to which the sameinformation about the coded depth and the encoding mode is assigned maybe inferred to be the data units included in the same maximum codingunit.

The image data decoding unit 230 restores the current picture bydecoding the image data in each maximum coding unit based on theinformation about the coded depth and the encoding mode according to themaximum coding units extracted by the encoding information extractor220. In other words, the image data decoding unit 230 may decode theencoded image data based on the extracted information about thepartition type, the prediction mode, and the transformation unit foreach coding unit from among the coding units having the tree structureincluded in each maximum coding unit. A decoding process may include anintra prediction process, a motion prediction process including motioncompensation, and an inverse transformation process.

The image data decoding unit 230 may perform intra prediction or motioncompensation according to a partition and a prediction mode of eachcoding unit, based on the information about the partition type and theprediction mode of the prediction unit of the coding unit according tocoded depths. Also, the image data decoding unit 230 may perform inversetransformation according to each transformation unit in the coding unit,based on the information about the size of the transformation unit ofthe coding unit according to coded depths, so as to perform the inversetransformation according to maximum coding units.

The image data decoder 230 may determine a coded depth of a currentmaximum coding unit by using split information according to depths. Ifthe split information indicates that image data is no longer split inthe current depth, the current depth is a coded depth. Accordingly, theimage data decoding unit 230 may decode a coding unit of the currentdepth of the encoded data in the current maximum coding unit by usingthe information about the partition type of the prediction unit, theprediction mode, and the size of the transformation unit. In otherwords, data units containing the encoding information including the samesplit information may be gathered by observing the encoding informationset assigned for the predetermined data unit from among the coding unit,the prediction unit, and the minimum unit, and the gathered data unitsmay be considered to be one data unit to be decoded by the image datadecoding unit 230 in the same encoding mode.

The image decoding apparatus 200 may obtain information about a codingunit that generates the minimum encoding error when encoding isrecursively performed for each maximum coding unit, and may use theinformation to decode the current picture. In other words, the codingunits having the tree structure determined to be the optimum codingunits in each maximum coding unit may be decoded. Accordingly, even ifimage data has high resolution and a large amount of data, the imagedata may be efficiently decoded and restored by using a size of a codingunit and an encoding mode, which are adaptively determined according tocharacteristics of the image data, by using information about an optimumencoding mode received from an encoder.

FIG. 3 is a diagram for describing a concept of hierarchical codingunits according to an exemplary embodiment.

Referring to FIG. 3, a size of a coding unit may be expressed inwidth×height, and may be 64×64, 32×32, 16×16, and 8×8. A coding unit of64×64 may be split into partitions of 64×64, 64×32, 32×64, or 32×32, anda coding unit of 32×32 may be split into partitions of 32×32, 32×16,16×32, or 16×16, a coding unit of 16×16 may be split into partitions of16×16, 16×8, 8×16, or 8×8, and a coding unit of 8×8 may be split intopartitions of 8×8, 8×4, 4×8, or 4×4.

In video data 310, a resolution is 1920×1080, a maximum size of a codingunit is 64, and a maximum depth is 2. In video data 320, a resolution is1920×1080, a maximum size of a coding unit is 64, and a maximum depth is3. In video data 330, a resolution is 352×288, a maximum size of acoding unit is 16, and a maximum depth is 1. The maximum depth shown inFIG. 3 denotes a total number of splits from a maximum coding unit to aminimum decoding unit.

If a resolution is high or a data amount is large, a maximum size of acoding unit may be large so as to not only increase encoding efficiencybut also to accurately reflect characteristics of an image. Accordingly,the maximum size of the coding unit of the video data 310 and 320 havingthe higher resolution than the video data 330 may be 64.

Since the maximum depth of the video data 310 is 2, coding units 315 ofthe video data 310 may include a maximum coding unit having a long axissize of 64, and coding units having long axis sizes of 32 and 16 sincedepths are deepened to two layers by splitting the maximum coding unittwice. Meanwhile, since the maximum depth of the video data 330 is 1,coding units 335 of the video data 330 may include a maximum coding unithaving a long axis size of 16, and coding units having a long axis sizeof 8 since depths are deepened to one layer by splitting the maximumcoding unit once.

Since the maximum depth of the video data 320 is 3, coding units 325 ofthe video data 320 may include a maximum coding unit having a long axissize of 64, and coding units having long axis sizes of 32, 16, and 8since the depths are deepened to 3 layers by splitting the maximumcoding unit three times. As a depth deepens, detailed information may beprecisely expressed.

FIG. 4 is a block diagram of an image encoder 400 based on coding unitsaccording to an exemplary embodiment.

The image encoder 400 according to an exemplary embodiment performsoperations of the coded depth determiner 120 of the image encodingapparatus 100 to encode image data.

Referring to FIG. 4, an intra predictor 410 performs intra prediction onprediction units in an intra mode, from among a current frame 405, and amotion estimator 420 and a motion compensator 425 performs interestimation and motion compensation on prediction units in an inter modeby using the current frame 405, and a reference frame 495.

Residual values are generated based on the prediction units output fromthe intra predictor 410, the motion estimator 420, and the motioncompensator 425, and the generated residual values are output as aquantized transformation coefficient through a transformer 430 and aquantizer 440.

The quantized transformation coefficient is restored as the residualvalues through an inverse quantizer 460 and an inverse transformer 470,and the restored residual values are output as the reference frame 495after being post-processed through a deblocking unit 480 and a loopfiltering unit 490. The quantized transformation coefficient may beoutput as a bitstream 455 through an entropy encoder 450.

In order to perform encoding according to an image encoding methodaccording to an exemplary embodiment, all elements of the image encoder400, i.e., the intra predictor 410, the motion estimator 420, the motioncompensator 425, the transformer 430, the quantizer 440, the entropyencoder 450, the inverse quantizer 460, the inverse transformer 470, thedeblocking unit 480, and the loop filtering unit 490 perform imageencoding operations based on each coding unit from among coding unitshaving a tree structure while considering the maximum depth of eachmaximum coding unit. Specifically, the intra predictor 410, the motionestimator 420, and the motion compensator 425 determines partitions anda prediction mode of each coding unit from among the coding units havinga tree structure while considering the maximum size and the maximumdepth of a current maximum coding unit, and the transformer 430determines the size of the transformation unit in each coding unit fromamong the coding units having a tree structure.

FIG. 5 is a block diagram of an image decoder 500 based on coding unitsaccording to an exemplary embodiment.

Referring to FIG. 5, a parser 510 parses encoded image data to bedecoded and information about encoding required for decoding from abitstream 505. The encoded image data is output as inverse quantizeddata through an entropy decoder 520 and an inverse quantizer 530, andthe inverse quantized data is restored to residual values through aninverse transformer 540. The residual values are restored according tocoding units by being added to an intra prediction result of an intrapredictor 550 or a motion compensation result of a motion compensator560. The restored coding units pass through a deblocking unit 570 and aloop filtering unit 580 to be used to predict a following coding unit orpicture to output a restored frame 595 or a reference frame 585.

In order to perform decoding according to an image decoding methodaccording to an exemplary embodiment, all elements of the image decoder500, i.e., the parser 510, the entropy decoder 520, the inversequantizer 530, the inverse transformer 540, the intra predictor 550, themotion compensator 560, the deblocking unit 570, and the loop filteringunit 580 perform image decoding processes based on the maximum codingunit, the coding unit according to depths, the prediction unit, and thetransformation unit. Specifically, the intra prediction 550 and themotion compensator 560 determine the prediction unit and the predictionmode of the coding unit by considering the maximum size and depth of thecoding unit, and the inverse transformer 540 determines the size oftransformation unit by considering the maximum size and depth of thecoding unit.

FIG. 6 is a diagram illustrating deeper coding units according todepths, and prediction units according to an exemplary embodiment.

The image encoding apparatus 100 and the image decoding apparatus 200use hierarchical coding units so as to consider characteristics of animage. A maximum height, a maximum width, and a maximum depth of codingunits may be adaptively determined according to the characteristics ofthe image, or may be differently set by a user. Sizes of deeper codingunits according to depths may be determined according to thepredetermined maximum size of the coding unit.

In a hierarchical structure 600 of coding units, according to anexemplary embodiment, the maximum height and the maximum width of thecoding units are each 64, and the maximum depth is 4. Since a depthdeepens along a vertical axis of the hierarchical structure 600, aheight and a width of the deeper coding unit are each split. Also, aprediction unit and partitions, which are bases for prediction encodingof each deeper coding unit, are shown along a horizontal axis of thehierarchical structure 600.

A coding unit 610 is a maximum coding unit in the hierarchical structure600, wherein a depth is 0 and a size, i.e., a height by width, is 64×64.The depth deepens along the vertical axis, and a coding unit 620 havinga size of 32×32 and a depth of 1, a coding unit 630 having a size of16×16 and a depth of 2, a coding unit 640 having a size of 8×8 and adepth of 3, and a coding unit 650 having a size of 4×4 and a depth of 4exist. The coding unit 650 having the size of 4×4 and the depth of 4 isa minimum coding unit.

Also, referring to FIG. 6, the prediction unit and the partitions of acoding unit are arranged along the horizontal axis according to eachdepth. In other words, if the coding unit 610 having the size of 64×64and the depth of 0 is a prediction unit, the prediction unit may besplit into partitions include in the coding unit 610, i.e. a partition610 having a size of 64×64, partitions 612 having the size of 64×32,partitions 614 having the size of 32×64, or partitions 616 having thesize of 32×32.

Similarly, a prediction unit of the coding unit 620 having the size of32×32 and the depth of 1 may be split into partitions included in thecoding unit 620, i.e. a partition 620 having a size of 32×32, partitions622 having a size of 32×16, partitions 624 having a size of 16×32, andpartitions 626 having a size of 16×16.

A prediction unit of the coding unit 630 having the size of 16×16 andthe depth of 2 may be split into partitions included in the coding unit630, i.e. a partition having a size of 16×16 included in the coding unit630, partitions 632 having a size of 16×8, partitions 634 having a sizeof 8×16, and partitions 636 having a size of 8×8.

A prediction unit of the coding unit 640 having the size of 8×8 and thedepth of 3 may be split into partitions included in the coding unit 640,i.e. a partition having a size of 8×8 included in the coding unit 640,partitions 642 having a size of 8×4, partitions 644 having a size of4×8, and partitions 646 having a size of 4×4.

The coding unit 650 having the size of 4×4 and the depth of 4 is theminimum coding unit and a coding unit of the lowermost depth. Aprediction unit of the coding unit 650 may be split into partitionsincluded in the coding unit 650, i.e. a partition 652 having a size of4×2 included in the coding unit 650, partitions 654 having a size of2×4, and partitions 656 having a size of 2×2.

In order to determine the at least one coded depth of the coding unitsconstituting the maximum coding unit 610, the coded depth determiner 120of the image encoding apparatus 100 performs encoding for coding unitscorresponding to each depth included in the maximum coding unit 610.

A number of deeper coding units according to depths including data inthe same range and the same size increases as the depth of coding unitincreases. For example, four coding units corresponding to a depth of 2are required to cover data that is included in one coding unitcorresponding to a depth of 1. Accordingly, in order to compare encodingresults of the same data according to depths, the coding unitcorresponding to the depth of 1 and four coding units corresponding tothe depth of 2 are each encoded.

In order to perform encoding for a current depth from among the depths,a least encoding error may be selected for the current depth byperforming encoding for each prediction unit in the coding unitscorresponding to the current depth, along the horizontal axis of thehierarchical structure 600. Alternatively, the minimum encoding errormay be searched for by comparing the least encoding errors according todepths, by performing encoding for each depth as the depth deepens alongthe vertical axis of the hierarchical structure 600. A depth and apartition having the minimum encoding error in the coding unit 610 maybe selected as the coded depth and a partition type of the coding unit610.

FIG. 7 is a diagram for describing a relationship between a coding unit710 and transformation units 720, according to an exemplary embodiment.

The image encoding apparatus 100 or the image decoding apparatus 200encodes or decodes an image according to coding units having sizessmaller than or equal to a maximum coding unit for each maximum codingunit. Sizes of transformation units for transformation during encodingmay be selected based on data units that are not larger than acorresponding coding unit. For example, if a size of the coding unit 710is 64×64, transformation may be performed by using the transformationunits 720 having a size of 32×32. Also, data of the coding unit 710having the size of 64×64 may be encoded by performing the transformationon each of the transformation units having the size of 32×32, 16×16,8×8, and 4×4, which are smaller than 64×64, and then a transformationunit having the least coding error may be selected.

FIG. 8 is a diagram for describing encoding information of coding unitscorresponding to a coded depth, according to an exemplary embodiment.

The image data coding unit 130 of the image encoding apparatus 100according to an exemplary embodiment may encode and transmit information800 about a partition type, information 810 about a prediction mode, andinformation 820 about a size of a transformation unit for each codingunit corresponding to a coded depth, as information about an encodingmode.

The information 800 indicates information about a structure of apartition obtained by splitting a prediction unit of a current codingunit, wherein the partition is a data unit for prediction encoding thecurrent coding unit. For example, a current coding unit CU_(—)0 having asize of 2N×2N may be split into any one of a partition 802 having a sizeof 2N×2N, a partition 804 having a size of 2N×N, a partition 806 havinga size of N×2N, and a partition 808 having a size of N×N. Here, theinformation 800 about a partition type is set to indicate one of thepartition 804 having a size of 2N×N, the partition 806 having a size ofN×2N, and the partition 808 having a size of N×N

The information 810 indicates a prediction mode of each partition. Forexample, the information 810 may indicate a mode of prediction encodingperformed on a partition indicated by the information 800, i.e., anintra mode 812, an inter mode 814, or a skip mode 816.

The information 820 indicates a size of a transformation unit to bebased on when transformation is performed on a current coding unit. Forexample, the transformation unit may be a first intra transformationunit 822, a second intra transformation unit 824, a first intertransformation unit 826, or a second intra transformation unit 828.

The encoding information extractor 220 of the image decoding apparatus200 may extract and use the information 800, 810, and 820 for decoding,according to each deeper coding unit

FIG. 9 is a diagram of deeper coding units according to depths,according to an exemplary embodiment.

Split information may be used to indicate a change of a depth. The spiltinformation indicates whether a coding unit of a current depth is splitinto coding units of a lower depth.

A prediction unit 910 for prediction encoding a coding unit 900 having adepth of 0 and a size of 2N_(—)0×2N_(—)0 may include partitions of apartition type 912 having a size of 2N_(—)0×2N_(—)0, a partition type914 having a size of 2N_(—)0×N_(—)0, a partition type 916 having a sizeof N_(—)0×2N_(—)0, and a partition type 918 having a size ofN_(—)0×N_(—)0. FIG. 9 only illustrates the partition types 912 through918 which are obtained by symmetrically splitting the prediction unit910, but a partition type is not limited thereto, and the partitions ofthe prediction unit 910 may include asymmetrical partitions, partitionshaving a predetermined structure, and partitions having a geometricalstructure.

Prediction encoding is repeatedly performed on one partition having asize of 2N_(—)0×2N_(—)0, two partitions having a size of 2N_(—)0×N_(—)0,two partitions having a size of N_(—)0×2N_(—)0, and four partitionshaving a size of N_(—)0×N_(—)0, according to each partition type. Theprediction encoding in an intra mode and an inter mode may be performedon the partitions having the sizes of 2N_(—)0×2N_(—)0, N_(—)0×2N_(—)0,2N_(—)0×N_(—)0, and N_(—)0×N_(—)0. The prediction encoding in a skipmode is performed only on the partition having the size of2N_(—)0×2N_(—)0. If an encoding error is smallest in one of thepartition types 912 through 916, the prediction unit 910 may not besplit into a lower depth.

If the encoding error is the smallest in the partition type 918, a depthis changed from 0 to 1 to split the partition type 918 in operation 920,and encoding is repeatedly performed on coding units 930 having a depthof 2 and a size of N_(—)0×N_(—)0 to search for a minimum encoding error.

A prediction unit 940 for prediction encoding the coding unit 930 havinga depth of 1 and a size of 2N_(—)1×2N_(—)1 (=N_(—)0×N_(—)0) may includepartitions of a partition type 942 having a size of 2N_(—)1×2N_(—)1, apartition type 944 having a size of 2N_(—)1×N_(—)1, a partition type 946having a size of N_(—)1×2N_(—)1, and a partition type 948 having a sizeof N_(—)1×N_(—)1.

If an encoding error is the smallest in the partition type 948, a depthis changed from 1 to 2 to split the partition type 948 in operation 950,and encoding is repeatedly performed on coding units 960, which have adepth of 2 and a size of N_(—)2×N_(—)2 to search for a minimum encodingerror.

When a maximum depth is d, split operation according to each depth maybe performed up to when a depth becomes d−1, and split information maybe encoded as up to when a depth is one of 0 to d−2. In other words,when encoding is performed up to when the depth is d−1 after a codingunit corresponding to a depth of d−2 is split in operation 970, aprediction unit 990 for prediction encoding a coding unit 980 having adepth of d−1 and a size of 2N_(d−1)×2N_(d−1) may include partitions of apartition type 992 having a size of 2N_(d−1)×2N_(d−1), a partition type994 having a size of 2N_(d−1)×N_(d−1), a partition type 996 having asize of N_(d−1)×2N_(d−1), and a partition type 998 having a size ofN_(d−1)×N_(d−1).

Prediction encoding may be repeatedly performed on one partition havinga size of 2N_(d−1)×2N_(d−1), two partitions having a size of2N_(d−1)×N_(d−1), two partitions having a size of N_(d−1)×2N_(d−1), fourpartitions having a size of N_(d−1)×N_(d−1) from among the partitiontypes 992 through 998 to search for a partition type having a minimumencoding error. Even when the partition type 998 has the minimumencoding error, since a maximum depth is d, a coding unit CU_(d−1)having a depth of d−1 is no longer split to a lower depth, and a codeddepth for the coding units constituting a current maximum coding unit900 is determined to be d−1 and a partition type of the current maximumcoding unit 900 may be determined to be N_(d−1)×N_(d−1). Also, since themaximum depth is d and a minimum coding unit 980 having a lowermostdepth of d−1 is no longer split to a lower depth, split information forthe minimum coding unit 980 is not set.

A data unit 999 may be a ‘minimum unit’ for the current maximum codingunit. A minimum unit according to an exemplary embodiment may be arectangular data unit obtained by splitting a minimum coding unit 980 by4. By performing the encoding repeatedly, the image encoding apparatus100 may select a depth having the least encoding error by comparingencoding errors according to depths of the coding unit 900 to determinea coded depth, and set a corresponding partition type and a predictionmode as an encoding mode of the coded depth.

As such, the minimum encoding errors according to depths are compared inall of the depths of 1 through d, and a depth having the least encodingerror may be determined as a coded depth. The coded depth, the partitiontype of the prediction unit, and the prediction mode may be encoded andtransmitted as information about an encoding mode. Also, since a codingunit is split from a depth of 0 to a coded depth, only split informationof the coded depth is set to 0, and split information of depthsexcluding the coded depth is set to 1.

The encoding information extractor 220 of the image decoding apparatus200 according to an exemplary embodiment may extract and use theinformation about the coded depth and the prediction unit of the codingunit 900 to decode the coding unit 900. The image decoding apparatus 200according to an exemplary embodiment may determine a depth, in whichsplit information is 0, as a coded depth by using split informationaccording to depths, and use information about an encoding mode of thecorresponding depth for decoding.

FIGS. 10 through 12 are diagrams for describing a relationship betweencoding units 1010, prediction units 1060, and transformation units 1070,according to an exemplary embodiment.

The coding units 1010 are coding units corresponding to coded depthsdetermined by the image encoding apparatus 100, in a maximum codingunit. The prediction units 1060 are partitions of prediction units ofeach of the coding units 1010, and the transformation units 1070 aretransformation units of each of the coding units 1010.

When a depth of the maximum coding unit is 0, depths of coding units1012 and 1054 are 1, depths of coding units 1014, 1016, 1018, 1028,1050, and 1052 are 2, depths of coding units 1020, 1022, 1024, 1026,1030, 1032, and 1048 are 3, and depths of coding units 1040, 1042, 1044,and 1046 are 4.

In the prediction units 1060, some coding units 1014, 1016, 1022, 1032,1048, 1050, 1052, and 1054 are obtained by splitting the coding units inthe coding units 1010. In other words, partition types in the codingunits 1014, 1022, 1050, and 1054 have a size of 2N×N, partition types inthe coding units 1016, 1048, and 1052 have a size of N×2N, and apartition type of the coding unit 1032 has a size of N×N. Predictionunits and partitions of the coding units 1010 are smaller than or equalto each coding unit.

Transformation or inverse transformation is performed on image data ofthe coding units 1052 and 1054 in the transformation units 1070 in adata unit that is smaller than the coding unit 1052 and 1054. Also, thecoding units 1014, 1016, 1022, 1032, 1048, 1050, 1052, and 1054 in thetransformation units 1070 are different from those in the predictionunits 1060 in terms of sizes and structures. In other words, the videoencoding and decoding apparatuses 100 and 200 may perform prediction,transformation, and inverse transformation on the same coding unit basedon individual data unit. Accordingly, encoding is recursively performedon each of coding units to determine an optimum coding unit, and thuscoding units having a recursive tree structure may be obtained.

Encoding information may include split information about a coding unit,information about a partition type, information about a prediction mode,and information about a size of a transformation unit. Table 1 shows theencoding information that may be set by the image encoding and decodingapparatuses 100 and 200.

TABLE 1 Split Information 0 Split (Encoding on Coding Unit having Sizeof 2N × 2N and Current Depth of d) Information 1 Prediction PartitionType Size of Transformation Unit Repeatedly Mode Encode IntraSymmetrical Asymmetrical Split Split Coding Units Inter PartitionPartition Information 0 of Information 1 of having Skip Type TypeTransformation Transformation Lower Depth (Only Unit Unit of d + 1 2N ×2N) 2N × 2N 2N × nU 2N × 2N N × N 2N × N 2N × nD (Symmetrical  N × 2N nL× 2N Type)  N × N nR × 2N N/2 × N/2 (Asymmetrical Type)

The image data coding unit 130 of the image encoding apparatus 100according to an exemplary embodiment may output the encoding informationabout the coding units having a tree structure, and the encodinginformation extractor 220 of the image decoding apparatus 200 accordingto an exemplary embodiment may extract the encoding information aboutthe coding units having a tree structure from a received bitstream.

Split information indicates whether a current coding unit is split intocoding units of a lower depth. If split information of a current depth dis 0, a depth, in which a current coding unit is no longer split into alower depth, is a coded depth, and thus information about a partitiontype, prediction mode, and a size of a transformation unit may bedefined for the coded depth. If the current coding unit is further splitaccording to the split information, encoding is independently performedon four split coding units of a lower depth.

A prediction mode may be one of an intra mode, an inter mode, and a skipmode. The intra mode and the inter mode may be defined in all partitiontypes, and the skip mode is defined only in a partition type having asize of 2N×2N.

The information about the partition type may indicate symmetricalpartition types having sizes of 2N×2N, 2N×N, N×2N, and N×N, which areobtained by symmetrically splitting a height or a width of a predictionunit, and asymmetrical partition types having sizes of 2N×nU, 2N×nD,nL×2N, and nR×2N, which are obtained by asymmetrically splitting theheight or width of the prediction unit. The asymmetrical partition typeshaving the sizes of 2N×nU and 2N×nD may be respectively obtained bysplitting the height of the prediction unit in 1:3 and 3:1, and theasymmetrical partition types having the sizes of nL×2N and nR×2N may berespectively obtained by splitting the width of the prediction unit in1:3 and 3:1

The size of the transformation unit may be set to be two types in theintra mode and two types in the inter mode. In other words, if splitinformation of the transformation unit is 0, the size of thetransformation unit may be 2N×2N, which is the size of the currentcoding unit. If split information of the transformation unit is 1, thetransformation units may be obtained by splitting the current codingunit. Also, if a partition type of the current coding unit having thesize of 2N×2N is a symmetrical partition type, a size of atransformation unit may be N×N, and if the partition type of the currentcoding unit is an asymmetrical partition type, the size of thetransformation unit may be N/2×N/2.

The encoding information about coding units having a tree structure mayinclude at least one of a coding unit corresponding to a coded depth, aprediction unit, and a minimum unit. The coding unit corresponding tothe coded depth may include at least one of a prediction unit and aminimum unit containing the same encoding information.

Accordingly, it is determined whether adjacent data units are includedin the same coding unit corresponding to the coded depth by comparingencoding information of the adjacent data units. Also, a correspondingcoding unit corresponding to a coded depth is determined by usingencoding information of a data unit, and thus a distribution of codeddepths in a maximum coding unit may be determined.

Accordingly, if a current coding unit is predicted based on encodinginformation of adjacent data units, encoding information of data unitsin deeper coding units adjacent to the current coding unit may bedirectly referred to and used.

Alternatively, if a current coding unit is predicted based on encodinginformation of adjacent data units, data units adjacent to the currentcoding unit are searched using encoding information of the data units,and the searched adjacent coding units may be referred for predictingthe current coding unit.

FIG. 13 is a diagram for describing a relationship between a codingunit, a prediction unit or a partition, and a transformation unit,according to encoding mode information of Table 1.

A maximum coding unit 1300 includes coding units 1302, 1304, 1306, 1312,1314, 1316, and 1318 of coded depths. Here, since the coding unit 1318is a coding unit of a coded depth, split information may be set to 0.Information about a partition type of the coding unit 1318 having a sizeof 2N×2N may be set to be one of a partition type 1322 having a size of2N×2N, a partition type 1324 having a size of 2N×N, a partition type1326 having a size of N×2N, a partition type 1328 having a size of N×N,a partition type 1332 having a size of 2N×nU, a partition type 1334having a size of 2N×nD, a partition type 1336 having a size of nL×2N,and a partition type 1338 having a size of nR×2N.

When the partition type is set to be symmetrical, i.e. the partitiontype 1322, 1324, 1326, or 1328, a transformation unit 1342 having a sizeof 2N×2N is set if split information (TU size flag) of a transformationunit is 0, and a transformation unit 1344 having a size of N×N is set ifa TU size flag is 1.

When the partition type is set to be asymmetrical, i.e., the partitiontype 1332, 1334, 1336, or 1338, a transformation unit 1352 having a sizeof 2N×2N is set if a TU size flag is 0, and a transformation unit 1354having a size of N/2×N/2 is set if a TU size flag is 1.

Hereinafter, a method of hierarchically encoding split information(split flag) indicating split structures of a maximum coding unitencoded based on the coding units according to depths, and skipinformation indicating whether a prediction mode of each coding unitincluded in a maximum coding unit is a skip mode, according to anexemplary embodiment, will be described in detail. In the followingdescription, a coding unit is a term used during image encoding and adecoding unit is a term for the coding unit in terms of image decoding.In other words, the coding unit and the decoding unit are different onlyin that the coding unit is used in the encoding process and the decodingunit is used in the decoding process. For the consistency of terms,except for a particular case, the coding unit and the decoding unit arereferred to as a coding unit in both the encoding and decodingprocesses.

FIG. 18 is a flowchart illustrating a method of encoding an image,according to an exemplary embodiment.

Referring to FIGS. 1 and 18, the maximum coding unit splitter 110 splitsa current picture into a least one maximum coding unit, in operation1610.

In operation 1620, the coded depth determiner 120 determines the splitstructures of the maximum coding unit and the prediction mode of eachcoding unit by encoding the image data of the maximum coding unit basedon the coding units hierarchically split as depth deepens. As describedabove, the coded depth determiner 120 determines the coded depth byencoding the image data based on the coding units according to depthsfor the maximum coding unit of the current picture, and selecting thedepth having the least encoding error. In detail, the coded depthdeterminer 120 encodes the image data in the maximum coding unit basedon the deeper coding units corresponding to at least one depth equal toor below the maximum depth, and compares results of encoding the imagedata based on each of the deeper coding units to select a depth havingthe least encoding error. Also, even if coding units correspond to samedepth in one maximum coding unit, the coded depth determiner 120determines a split of each of the coding units corresponding to the samedepth to a lower depth by measuring an encoding error of the image dataof each coding unit, separately.

In operation 1630, the encoding information coding unit 140 sets splitinformation about a split of a coding unit of an upper depth includingeach coding unit, for each coding unit. A process of setting the splitinformation will be described below with reference to FIGS. 14 through16.

In operation 1640, the encoding information coding unit 140 sets skipinformation indicating whether a prediction mode determined according tocoding units is a skip mode. In operation 1650, the split informationand skip information set according to coding units are encoded.

FIG. 14 is a diagram of split structures of a maximum coding unitdetermined based on deeper coding units, according to an exemplaryembodiment.

In FIG. 14, a largest block denoted by a reference numeral 1200 is themaximum coding unit, and it is assumed that the maximum coding unit 1200has a maximum depth of 3. In other words, when a size of the maximumcoding unit 1200 is 2N×2N, the maximum coding unit 1200 may split into acoding unit 1210 having a size of N×N and a depth of 1, coding units1220 having a size of (N/2)×(N/2) and a depth of 2, and coding units1230 having a size of (N/4)×(N/4) and a depth of 3. In order to transmitthe split structures of maximum coding unit 1200 shown in FIG. 14, theencoding information coding unit 140 according to an exemplaryembodiment sets the split information indicating split of the codingunit of upper depth including each coding unit, for each coding unit.For example, the coding unit 1210 having the size of N×N and the depthof 1 includes split information of 1 bit indicating split of an uppercoding unit, i.e., the maximum coding unit 1200 having a depth of 0. Ifa coding unit of corresponding depth is split when each bit of splitinformation has a value of “1”, and a coding unit of corresponding depthis not split when each bit of split information has a value of “0”, thecoding unit 1210 having the depth of 1 has split information having avalue of “1” to have the split structures shown in FIG. 14.

FIG. 15 is a diagram for describing split information of the coding unit1220 of FIG. 14 having a depth of 2. A reference numeral 1320 of FIG. 15corresponds to the coding unit 1220 having the depth of 2 in FIG. 14.

Referring to FIG. 15, the encoding information coding unit 140 setssplit information of 2 bits indicating a split of a coding unit 1310having a depth of 1 including the coding unit 1320 having a depth of 2,and split of the maximum coding unit 1300 having a depth of 0, as splitinformation of the coding unit 1320 having the depth of 2. If a codingunit of corresponding depth is split when each bit of split informationhas a value of “1”, and a coding unit of corresponding depth is notsplit when each bit of split information has a value of “0”, the codingunit 1320 has the split information of 2 bits having a value of “11”since the coding unit 1320 is generated when both of the coding unit1310 and the maximum coding unit 1300 are split.

FIG. 16 is a diagram for describing split information of the coding unit1230 of FIG. 14 having a depth of 3. A reference numeral 1430 of FIG. 16corresponds to the coding unit 1230 of FIG. 14 having the depth of 3.

Referring to FIG. 16, the encoding information coding unit 140 includessplit information of 3 bits indicating spilt of a coding unit 1420having a depth of 2 and including the coding unit 1430 having the depthof 3, a split of a coding unit 1410 having a depth of 1, and split of amaximum coding unit 1400, as split information of the coding unit 1430having the depth of 3. If a coding unit of corresponding depth is splitwhen each bit of split information has a value of “1”, and a coding unitof corresponding depth is not split when each bit of split informationhas a value of “0”, the coding unit 1430 has the split information of 3bits having a value of “111” since the coding unit 1430 is generatedwhen all of the coding unit 1420, the coding unit 1410, and the maximumcoding unit 1400 are split.

As such, when d denotes a maximum depth indicating a number ofhierarchical splits of a height and width of a current coding unit froma maximum coding unit to a minimum coding unit and n denotes a depth ofthe current coding unit, wherein d and n are respectively an integer and0≦n≦(d−1), a split of a coding unit of an upper depth including thecurrent coding unit may be set by using split information of n bits.Each bit of the split information of n bits is set to indicate split ofcoding units having depth upper than the current coding unit, from adepth of 0 to a depth of (n−1). Here, an order of the split informationof n bits indicating split of coding units having upper depths from amost significant bit (MSB) or from a least significant bit (LSB) mayvary as occasion commands.

Meanwhile, if the split information indicating split of the coding unitof the upper depth including the current coding unit is set for eachcoding unit, a location of each coding unit in the maximum coding unitmay be easily determined based on the split information when the codingunits are processed in the same processing order by an encoder and adecoder. For example, as shown in FIG. 17, when coding units having thesame depth in a maximum coding unit 1500 according to an exemplaryembodiment are processed in a zigzag scan order, and decoding unitshaving the same depth are processed in the same zigzag scan order duringdecoding, it is possible to restore spilt structures of the maximumcoding unit 1500 determined during encoding from split informationindicating split of coding units of upper depths including each codingunit. A block processing order according to an exemplary embodiment maybe variously set including the zigzag scan order, but processing ordersof coding units may be identical during encoding and decoding so as todetermine split structures of a maximum coding unit during the decoding.

The encoding information coding unit 140 sets skip informationindicating whether a prediction mode of each coding unit is a skip mode,by assigning 1 bit to each coding unit. For example, the prediction modeof the corresponding coding unit is a skip mode when a bit of skipinformation has a value of “1”, and the corresponding coding unit ispredicted according to a prediction mode other than a skip mode when thebit of skip information has a value of “0”. The skip information is setfor each coding unit because a coding unit in a skip mode is restoredfrom motion information of adjacent coding units without a separateprediction process and a separate split process is not performed on thecoding unit in the skip mode during decoding, thereby improvingcompression efficiency and processing performance of an image.

FIG. 19 is a flowchart illustrating a method of encoding an image,according to another exemplary embodiment.

Referring to FIG. 19, the maximum coding unit splitter 110 splits acurrent picture into a least one maximum coding unit, in operation 1710.

In operation 1720, the coded depth determiner 120 determines the splitstructures of the maximum coding unit and the prediction mode of eachcoding unit by encoding the image data of the maximum coding unit basedon the deeper coding units hierarchically split as depth deepens. Asdescribed above, the coded depth determiner 120 determines the codeddepth by encoding the image data in the deeper coding units according todepths, according to the maximum coding unit of the current picture, andselecting the depth having the least encoding error.

In operation 1730, the encoding information coding unit 140 sets skipinformation indicating whether prediction modes of each coding unit anda coding unit of upper depth including each coding unit are each a skipmode, for each coding unit. In other words, according to anotherexemplary embodiment, the skip information of each coding unit mayinclude not only a skip mode of a current coding unit, but also a skipmode of a coding unit of an upper depth including the current codingunit. In detail, when d denotes a maximum depth indicating a number ofhierarchical splits of a height and width of a current coding unit froma maximum coding unit to a minimum coding unit and n denotes a depth ofthe current coding unit, wherein d and n are respectively an integer and0≦n≦(d−1), the encoding information coding unit 140 may set splitinformation of n bits indicating whether prediction modes of the currentcoding unit and (n−1) coding units of upper depths are each a skip mode.When n=1, i.e., when the current coding unit has a depth of 1, a codingunit having an immediately upper depth is a maximum coding unit, andthus only skip information of 1 bit indicating whether the predictionmode of the current coding unit is a skip mode is set. For example, thecoding unit 1210 of FIG. 14 having the depth of 1 has skip informationof 1 bit indicating whether its prediction mode is a skip mode.

Alternatively, referring to FIG. 15, the encoding information unit 140sets skip information of total 2 bits, wherein 1 bit indicates skipinformation of the coding unit 1320 having a depth of 2 and 1 bitindicates skip information of the coding unit 1310 having the depth of 1and including the coding unit 1320, as the skip information of thecoding unit 1320. Alternatively, referring to FIG. 16, the encodinginformation coding unit 140 may set skip information of total 3 bits,which includes skip information of the coding unit 1430 having a depthof 3, skip information of the coding unit 1420 having the depth of 2 andincluding the coding unit 1430, and skip information of the coding unit1410 having a depth of 1, as the skip information of the coding unit1430.

Referring back to FIG. 19, split information about a split of a codingunit of an upper depth including each coding unit is set for each codingunit, in operation 1740. Since setting of split information in operation1740 is identical to the setting described above, details thereof arenot repeated.

In operation 1750, the split information and skip information, which areset according to coding units, are encoded.

FIG. 20 is a flowchart illustrating a method of decoding an image,according to an exemplary embodiment. The method according to thecurrent embodiment decodes a bitstream encoded according to the methodof FIG. 18.

Referring to FIGS. 2 and 20, the encoding information extractor 220extracts split information indicating split of a decoding unit of anupper depth including a current decoding unit to be decoded, from imagedata encoded according to maximum coding units based on deeper codingunits according to depths, which are hierarchically split as a depthdeepens, in operation 1810.

In operation 1820, the encoding information extractor 220 extracts skipinformation indicating whether a prediction mode of the current decodingunit is a skip mode, from the image data.

In operation 1830, the image data decoding unit 230 determines splitstructures of a maximum decoding unit including the current decodingunit, according to the split information. As described above, since thesplit information is in n bits indicating split of the decoding unit ofupper depth including the current decoding unit, the maximum decodingunit may be split to a coding unit having a depth of the currentdecoding unit by using the split information.

In operation 1840, the image data decoding unit 230 determines whetherthe prediction mode of the current decoding unit is a skip mode,according to the skip information. If the current decoding unit is inthe skip mode, a split process is stopped and other information includedin encoding information is decoded.

FIG. 21 is a flowchart illustrating a process of splitting a maximumdecoding unit and a process of decoding skip information, according to amethod of decoding an image, according to an exemplary embodiment.

Referring to FIG. 21, encoding information of coding units included in amaximum coding unit is extracted in operation 1910. As described above,the encoding information includes split information and skipinformation.

The split information is decoded in operation 1920, and it is determinedwhether a maximum decoding unit is split according to a depth set basedon the decoded split information to a current decoding unit having thedepth, in operation 1930. For example, as described above, if thecurrent decoding unit is a decoding unit having a depth of 2 and splitinformation of “11”, the current decoding unit should be included incoding units obtained by splitting the maximum decoding unit twice.

If it is determined that the maximum decoding unit is not split up tothe depth of the current decoding unit in operation 1930, a depth isincreased by one in operation 1935.

If it is determined that the maximum decoding unit is split up to thedepth of the current decoding unit in operation 1930, the skipinformation is decoded in operation 1940. It is determined whether aprediction mode of the current decoding unit is a skip mode in operation1950, and if it is the skip mode, it is determined whether the currentdecoding unit is the last decoding unit 1960 to decode a followingmaximum decoding unit in operation 1970 or to decode a followingdecoding unit by increasing an index value of a decoding unit by 1 inoperation 1980.

If it is determined that the prediction mode of the current decodingunit is not the skip mode in operation 1950, information about the imagedata other than the split and skip information is decoded in operation1955.

FIG. 22 is a flowchart illustrating a method of decoding an image,according to another exemplary embodiment. The method according to thecurrent embodiment decodes a bitstream encoded according to the methodof FIG. 19.

Referring to FIGS. 2 and 22, the encoding information extractor 220extracts skip information indicating whether prediction modes of acurrent decoding unit to be decoded and decoding units of upper depthsincluding the current decoding unit are each a skip mode, from imagedata encoded according to maximum coding units based on deeper codingunits according to depths, which are hierarchically split as a depthdeepens, in operation 2010.

In operation 2020, the encoding information extractor 220 extracts splitinformation about a split of the decoding unit of upper depth includingthe current decoding unit, from the image data.

In operation 2030, the image data decoding unit 230 determines whetherthe prediction modes of the current decoding unit and the decoding unitof upper depths are each a skip mode, based on the extracted skipinformation. As such, according to the current embodiment, when the skipinformation is decoded before decoding the split information, processingperformance of an image may be improved since a decoding unit that isdetermined to be in a skip mode may not split.

In operation 2040, split structures of a maximum decoding unit includingthe current decoding unit are determined based on the split informationwith respect to the decoding unit that is not in a skip mode.

FIG. 23 is a flowchart illustrating a process of splitting a maximumdecoding unit and a process of decoding skip information, according to amethod of decoding an image, according to another exemplary embodiment.

Referring to FIG. 23, encoding information of coding units included in amaximum coding unit is extracted in operation 2110. As described above,the encoding information includes split information and skipinformation.

The skip information is decoded in operation 2120, and it is determinedwhether a prediction mode of a current decoding unit is a skip modeaccording to the decoded skip information in operation 2130. If theprediction mode of the current decoding unit is a skip mode, it isdetermined whether the current decoding unit is the last decoding unitin operation 2135. If it is the last decoding unit, a following maximumdecoding unit is decoded in operation 2140, and if it is not the lastdecoding unit, a following decoding unit is decoded by increasing anindex of a decoding unit by one in operation 2145. If the predictionmode of the current decoding unit is not a skip mode, the splitinformation of the current decoding unit is decoded in operation 2150.

It is determined whether a maximum decoding unit is split according to adepth set based on the decoded split information to a current decodingunit having the depth, in operation 2160. For example, as describedabove, if the current decoding unit is a decoding unit having a depth of2 and split information of “11”, the current decoding unit should be acoding unit obtained by splitting the maximum decoding unit twice.

If it is determined that the maximum decoding unit is not split up tothe depth of the current decoding unit in operation 2160, a depth isincreased by one in operation 2180, and if it is determined that themaximum decoding unit is split up to the depth of the current decodingunit in operation 2160, information about the image data other than thesplit and skip information is decoded in operation 2170.

According to the exemplary embodiments, methods and apparatuses forencoding and decoding an image, which efficiently transmit informationabout split structures of an image encoded based on a hierarchicalcoding unit in various sizes, and information about a skip mode of eachcoding unit may be provided.

The exemplary embodiments may also be embodied as computer readable codeon a computer readable recording medium. The computer readable recordingmedium is any data storage device that can store data which can bethereafter read by a computer system. Examples of the computer readablerecording medium include read-only memory (ROM), random-access memory(RAM), CD-ROMs, magnetic tapes, floppy disks, and optical data storagedevices. The computer readable recording medium can also be distributedover network coupled computer systems so that the computer readable codeis stored and executed in a distributed fashion.

While the inventive concept has been particularly shown and describedwith reference to exemplary embodiments thereof, it will be understoodby one of ordinary skill in the art that various changes in form anddetails may be made therein without departing from the spirit and scopeof the exemplary embodiments as defined by the following claims. Theexemplary embodiments should be considered in a descriptive sense onlyand not for purposes of limitation. Therefore, the scope of theinventive concept is defined not by the detailed description of theexemplary embodiments but by the following claims.

What is claimed is:
 1. An apparatus for decoding an image, the apparatuscomprising: an encoding information extractor which extracts splitinformation indicating whether to split a coding unit of an upper depthinto coding units of deeper depths and skip information indicatingwhether a prediction mode of a current coding unit is a skip mode; and adecoding unit which determines a split structure of a maximum codingunit according to the split information, when the skip informationindicates that the prediction mode of the current coding unit is theskip mode, determines the current coding unit as one prediction unit ofwhich prediction mode is the skip mode and when the skip informationindicates that the prediction mode of the current coding unit is not theskip mode, obtains one or more prediction units from the current codingunit.